;+
; NAME:
;  prompt_kbrd
;
; PURPOSE:
;  Prompt the user for an input key.  Wrapper for get_kbrd() that only prompts
;  if the display type is 'X'.
;
; CALLING SEQUENCE:
;  key = prompt_kbrd('optional prompt string',format=)
;
; OPTIONAL INPUTS:
;  prompt_string: Optional string to display while waiting for input.
;  format: a format for printing the string.
;
; EXAMPLE:
;  key = prompt_kbrd('Hit a key')
;
; MODIFICATION HISTORY:
;  Created: 2005, Erin Sheldon, Uchicago
;-
;
;
;
;  Copyright (C) 2005  Erin Sheldon, NYU.  erin dot sheldon at gmail dot com
;
;    This program is free software; you can redistribute it and/or modify
;    it under the terms of the GNU General Public License as published by
;    the Free Software Foundation; either version 2 of the License, or
;    (at your option) any later version.
;
;    This program is distributed in the hope that it will be useful,
;    but WITHOUT ANY WARRANTY; without even the implied warranty of
;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;    GNU General Public License for more details.
;
;    You should have received a copy of the GNU General Public License
;    along with this program; if not, write to the Free Software
;    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
;
;

function prompt_kbrd, prmpt, format=format

  if !d.name EQ 'X' then begin 
      if n_elements(prmpt) ne 0 then begin 
          print,prmpt,format=format
      endif
      return,get_kbrd(1)
  endif else begin 
      return,''
  endelse 

end 
